#if UNITY_2019_1_OR_NEWER
using UnityEngine;
using TMPro;

namespace rsync
{
    public partial class RsyncManager : MonoBehaviour
    {
        [SerializeField] private TextMeshProUGUI SimulationInfoLabel;
        [SerializeField] private TextMeshProUGUI RollbackInfoLabel;

        public string[] AdressesSerial = {"127.0.0.1", "127.0.0.1", "127.0.0.1", "127.0.0.1"};
        public ushort[] PortsSerial = {7001, 7002, 7003, 7004};

        private void Awake()
        {
            Adresses = AdressesSerial;
            AdressesSerial = null;
            Ports = PortsSerial;
            PortsSerial = null;
            if(SimulationInfoLabel) SimulationInfo = info => SimulationInfoLabel.text = info;
            if(RollbackInfoLabel) RollbackInfo = info => RollbackInfoLabel.text = info;
        }

        private void FixedUpdate()
        {
            if (!Started) return;
            GameLoop();
        }
    }
}
#endif